  
function isValidEmail(email) {
 var format = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/;
    if (email.search(format) != -1)
        return true; //�щ컮瑜��щ㎎ �뺤떇
    return false;
}

String.prototype.trim = function() {
  var TRIM_PATTERN = /(^\s*)|(\s*$)/g;
  return this.replace(TRIM_PATTERN, "");
}

function sendIt() {
    f = document.myForm;
    
    str = f.subject.value;
    str = str.trim();
    if(!str) {
        alert("제목을입력하세요");
        f.subject.focus();
        return;
    }
    f.subject.value = str;

    str = f.uploadFile.value;
    if(!str) {
        alert("파일을 첨부하세요!!");
        f.uploadFile.focus();
        return;
    }
    f.action="/study/image/write_ok.do";
    f.submit();
}